package cn.edu.cqut.test4;

import cn.edu.cqut.test3.People;

public class TestStudent {
	public static void main(String[] args) {
//		Student student = new Student(20,10000);
//		System.out.println(student.toString());
//		if(student instanceof People)
//		{
//			People people = (People)student;
//			people.showPeopleMess();
//		}
//		People people2 = new People(10);
//		if(people2 instanceof Student)
//		{
//			Student student2 = (Student)people2;
//			System.out.println(student2.number);
//		}
//		System.out.println(people2.toString());
		
		People people = new People(10);
		new TestStudent().showMessage(people);
		Student stu = new Student(20, 10000);
		new TestStudent().showMessage(stu);
	}
	
	public void showMessage(Object obj)
	{
		System.out.println(obj.toString());
	}
}
